

tableS1 <- data.frame(ITT = rep(NA, 6), 
                     SE = rep(NA, 6),  
                     P = rep(NA, 6),
                     q025 = rep(NA, 6),  
                     q975 = rep(NA, 6),  
                     N = rep(NA, 6))
tableS1[1, ] <- summary(ITT_S1_path)
tableS1[2, ] <- summary(ITT_S1_immg)
tableS1[3, ] <- summary(ITT_S1_trus)
tableS1[4, ] <- summary(ITT_S1_appr)
tableS1[5, ] <- summary(ITT_S1_vint)
tableS1[6, ] <- summary(ITT_S1_actv)
rownames(tableS1) <- c('Path to Citizenship', 'Legal Immigration', 'Trust', 
  'Approval', 'Vote Intent', 'Actual Vote')

# table S2 already created
rownames(tableS2) <- c('Path to Citizenship', '1', 'Legal Immigration', '2', 'Trust', '3', 
  'Approval', '4', 'Vote Intent', '5', 'Actual Vote', '6')

tableS3 <- data.frame(CACE = rep(NA, 6), 
                     SE = rep(NA, 6),  
                     P = rep(NA, 6),
                     q025 = rep(NA, 6),  
                     q975 = rep(NA, 6),  
                     N = rep(NA, 6),  
                     min = rep(NA, 6),  
                     max = rep(NA, 6))
tableS3[1, ] <- summary(IPW_CACE_S1_path)
tableS3[2, ] <- summary(IPW_CACE_S1_immg)
tableS3[3, ] <- summary(IPW_CACE_S1_trus)
tableS3[4, ] <- summary(IPW_CACE_S1_appr)
tableS3[5, ] <- summary(IPW_CACE_S1_vint)
tableS3[6, ] <- summary(IPW_CACE_S1_actv)
tableS3$min <- boundsS1$min
tableS3$max <- boundsS1$max
rownames(tableS3) <- c('Path to Citizenship', 'Legal Immigration', 'Trust', 
  'Approval', 'Vote Intent', 'Actual Vote')

tableS4 <- data.frame(CACE = rep(NA, 6), 
                      SE = rep(NA, 6),  
                      P = rep(NA, 6),
                      N = rep(NA, 6))
tableS4[1, ] <- SummarizeLOO(loo_path)
tableS4[2, ] <- SummarizeLOO(loo_immg)
tableS4[3, ] <- SummarizeLOO(loo_trus)
tableS4[4, ] <- SummarizeLOO(loo_appr)
tableS4[5, ] <- SummarizeLOO(loo_vint)
tableS4[6, ] <- SummarizeLOO(loo_actv)
rownames(tableS4) <- c('Path to Citizenship', 'Legal Immigration', 'Trust', 
  'Approval', 'Vote Intent', 'Actual Vote')

# note: alternate rows are for same party, opposite party (repeating)
tableS5 <- data.frame(CACE = rep(NA, 12), 
                     SE = rep(NA, 12),  
                     P = rep(NA, 12),
                     q025 = rep(NA, 12),  
                     q975 = rep(NA, 12),  
                     N = rep(NA, 12),  
                     P_compare = rep(NA, 12))
tableS5[1:2, ] <- SummarizeConditionalEffects(Copartisan_CACE_S1_path)
tableS5[3:4, ] <- SummarizeConditionalEffects(Copartisan_CACE_S1_immg)
tableS5[5:6, ] <- SummarizeConditionalEffects(Copartisan_CACE_S1_trus)
tableS5[7:8, ] <- SummarizeConditionalEffects(Copartisan_CACE_S1_appr)
tableS5[9:10, ] <- SummarizeConditionalEffects(Copartisan_CACE_S1_vint)
tableS5[11:12, ] <- SummarizeConditionalEffects(Copartisan_CACE_S1_actv)
tableS5.forprint <- data.frame('Same Party lo' = rep(NA, 6), 
                               'Same Party hi' = rep(NA, 6),
                               'Opposite Party lo' = rep(NA, 6), 
                               'Opposite Party hi' = rep(NA, 6), 
                               P = rep(NA, 6))
tableS5.forprint[, 1] <- tableS5$q025[seq(1, 11, 2)]
tableS5.forprint[, 2] <- tableS5$q975[seq(1, 11, 2)]
tableS5.forprint[, 3] <- tableS5$q025[seq(2, 12, 2)]
tableS5.forprint[, 4] <- tableS5$q975[seq(2, 12, 2)]
tableS5.forprint$P <- tableS5$P_compare[seq(1, 11, 2)]
rownames(tableS5.forprint) <- c('Path to Citizenship', 'Legal Immigration', 'Trust', 
  'Approval', 'Vote Intent', 'Actual Vote')

tableS6 <- data.frame(ITT = rep(NA, 6), 
                      SE = rep(NA, 6),  
                      P = rep(NA, 6),
                      q025 = rep(NA, 6),  
                      q975 = rep(NA, 6),  
                      N = rep(NA, 6))
tableS6[1, ] <- summary(ITT_S2_wate)
tableS6[2, ] <- summary(ITT_S2_clos)
tableS6[3, ] <- summary(ITT_S2_trus)
tableS6[4, ] <- summary(ITT_S2_appr)
tableS6[5, ] <- summary(ITT_S2_vint)
tableS6[6, ] <- summary(ITT_S2_actv)
rownames(tableS6) <- c('Waterboarding', 'Guantanamo', 'Trust', 
  'Approval', 'Vote Intent', 'Actual Vote')

# table S7 already created
rownames(tableS7) <- c('Torture (rep. Waterboarding)', '1', 'Torture (rep. Guantanamo)', '2', 'Trust', '3', 
  'Approval', '4', 'Vote Intent', '5', 'Actual Vote', '6')

tableS8 <- data.frame(CACE = rep(NA, 6), 
                      SE = rep(NA, 6),  
                      P = rep(NA, 6),
                      q025 = rep(NA, 6),  
                      q975 = rep(NA, 6),  
                      N = rep(NA, 6),
                      min = rep(NA, 6),
                      max = rep(NA, 6))
tableS8[1, ] <- summary(IPW_CACE_S2_wate)
tableS8[2, ] <- summary(IPW_CACE_S2_clos)
tableS8[3, ] <- summary(IPW_CACE_S2_trus)
tableS8[4, ] <- summary(IPW_CACE_S2_appr)
tableS8[5, ] <- summary(IPW_CACE_S2_vint)
tableS8[6, ] <- summary(IPW_CACE_S2_actv)
tableS8$min <- boundsS2$min
tableS8$max <- boundsS2$max
rownames(tableS8) <- c('Waterboarding', 'Guantanamo', 'Trust', 
  'Approval', 'Vote Intent', 'Actual Vote')

# note: alternate rows are for same party, opposite party (repeating)
tableS9 <- data.frame(CACE = rep(NA, 12), 
                      SE = rep(NA, 12),  
                      P = rep(NA, 12),
                      q025 = rep(NA, 12),  
                      q975 = rep(NA, 12),  
                      N = rep(NA, 12),  
                      P_compare = rep(NA, 12))
tableS9[ 1: 2, ] <- SummarizeConditionalEffects(Copartisan_CACE_S2_wate)
tableS9[ 3: 4, ] <- SummarizeConditionalEffects(Copartisan_CACE_S2_clos)
tableS9[ 5: 6, ] <- SummarizeConditionalEffects(Copartisan_CACE_S2_trus)
tableS9[ 7: 8, ] <- SummarizeConditionalEffects(Copartisan_CACE_S2_appr)
tableS9[ 9:10, ] <- SummarizeConditionalEffects(Copartisan_CACE_S2_vint)
tableS9[11:12, ] <- SummarizeConditionalEffects(Copartisan_CACE_S2_actv)
tableS9.forprint <- data.frame('Same Party lo' = rep(NA, 6), 
                               'Same Party hi' = rep(NA, 6),
                               'Opposite Party lo' = rep(NA, 6), 
                               'Opposite Party hi' = rep(NA, 6), 
                               P = rep(NA, 6))
tableS9.forprint[, 1] <- tableS9$q025[seq(1, 11, 2)]
tableS9.forprint[, 2] <- tableS9$q975[seq(1, 11, 2)]
tableS9.forprint[, 3] <- tableS9$q025[seq(2, 12, 2)]
tableS9.forprint[, 4] <- tableS9$q975[seq(2, 12, 2)]
tableS9.forprint$P <- tableS9$P_compare[seq(1, 11, 2)]
rownames(tableS9.forprint) <- c('Waterboarding', 'Guantanamo', 'Trust', 
  'Approval', 'Vote Intent', 'Actual Vote')

cat('\n\nTable S1\n')
print(round(tableS1[, -(4:5)], 3), digits = 3)

cat('\n\nTable S2\n')
print(round(tableS2, 3), digits = 3)

cat('\n\nTable S3\n')
print(round(tableS3[, -(4:5)], 3), digits = 3)

cat('\n\nTable S4\n')
print(round(tableS4, 3), digits = 3)

cat('\n\nTable S5\n')
print(round(tableS5.forprint, 3), digits = 3)

cat('\n\nTable S6\n')
print(round(tableS6[, -(4:5)], 3), digits = 3)

cat('\n\nTable S7\n')
print(round(tableS7, 3), digits = 3)

cat('\n\nTable S8\n')
print(round(tableS8[, -(4:5)], 3), digits = 3)

cat('\n\nTable S9\n')
print(round(tableS9.forprint, 3), digits = 3)